<template>
  <div class="userIndexSwiper">
      <el-carousel :interval="4000" type="card" height="280px">
          <el-carousel-item v-for="(item, index) in swiperDataList" :key="index">
              <img :src="item.picImg" />
          </el-carousel-item>
      </el-carousel>
  </div>

</template>

<script>
export default {
  name: 'userIndexSwiper',
  data () {
    return {
      swiperDataList: {}
    }
  },
  created () {
    this.swiperDataList = this.getSwiperDataList()
  },
  methods: {
    getSwiperDataList () {
      return [{
        picImg: 'http://p1.music.126.net/Ce_fnh_vsqztDJYq0wLjjg==/109951165514236180.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/Cj7EKRmeT0IfguP1YTcZ-Q==/109951165514228724.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/Y9JuojOiDoeoO2t6wZZDPQ==/109951165514400707.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/9oI0WWN-95s-n77WaC9yDg==/109951165514550569.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/130LNz7Pc9UfA3VVYY6fxw==/109951165514415926.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/UdqEwATHWryvB1zp0Hx4WQ==/109951165515111081.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/BElPLxqzJCvnJ_xjt_omYA==/109951165514505693.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/bcZDvYhIAYBLDAlvu_sEwg==/109951165514410334.jpg?imageView&quality=89'
      }, {
        picImg: 'http://p1.music.126.net/7RUcn2OHVquybwFtJ0k20g==/109951165514263749.jpg?imageView&quality=89'
      }]
    }
  }
}
</script>

<style scoped>
.userIndexSwiper{
  width: 90%;
  margin: auto;
  margin-top: 10px;
}
.userIndexSwiper img {
  width: 100%;
}
</style>
